package cc.togetherit.jcrawler.crawler;

import java.util.Map;

import cc.togetherit.jcrawler.dataPool.MemPool;
import cc.togetherit.jcrawler.fetch.FetchRequest;


public abstract class MemPoolCrawlerContext extends CrawlerContext {



    public MemPoolCrawlerContext(CrawlerConfig config) {
        super(config);
    }
    @Override
    public abstract void buildPersistenceEngine();
    @Override
    public abstract void buildParseEngine() ;
    @Override
    public abstract void buildFetchEngine() ;
    @Override
    public abstract void buildDownEngine() ;

    @Override
    public void buildPool() {
        setDownLoadPool(new MemPool<String>(MemPool.defaultMaxSize));
        setFetchPool(new MemPool<FetchRequest>(MemPool.defaultMaxSize));
        setParsePool(new MemPool<FetchRequest>(MemPool.defaultMaxSize));
        setPersitencePool(new MemPool<Map<String,Object>>(MemPool.defaultMaxSize));
    }
}
